package com.longge;

import java.util.HashSet;

public class VowelStrings {

    public int vowelStrings(String[] words, int left, int right) {

        HashSet<Character> set = new HashSet<>();
        set.add('a');
        set.add('e');
        set.add('i');
        set.add('o');
        set.add('u');
        int ans = 0;
        for (int i = left; i <= right; i++) {
            if (set.contains(words[i].charAt(0)) && set.contains(words[i].charAt(words[i].length() - 1))) {
                ans++;
            }
        }
        return ans;
    }
}
